package day10zy.sedan;

public class Sedan {
    private String color;
    private String chepai;
    public void setColor(String color) {
        this.color = color;
    }

    public void setChepai(String chepai) {
        this.chepai = chepai;
    }

    public String getColor() {
        return color;
    }

    public String getChepai() {
        return chepai;
    }

    public Sedan(){

    }
    public Sedan(String color,String chepai){
        this.color = color;
        this.chepai = chepai;
    }
    public void Introduce(String type){
        System.out.println("这是一款"+type+"车,颜色是"+color+"车牌是"+chepai);
    }
    public void startup(String type){
        System.out.println(type+"车正在启动");
    }
    public void accelerate(String type){
        System.out.println(type+"车正在加速");
    }
    public void brake(String type){
        System.out.println(type+"车正在刹车");
    }
}
class dazhong extends Sedan{
    public dazhong(String color,String chepai){
        super(color,chepai);
        super.Introduce("大众");
        super.startup("大众");
        super.accelerate("大众");
        super.brake("大众");
    }
    public dazhong(){

    }
}
class wuling extends Sedan{
    public wuling(String color,String chepai){
        super(color,chepai);
        super.Introduce("五菱");
        super.startup("五菱");
        super.accelerate("五菱");
        super.brake("五菱");
    }
    public wuling(){

    }
}
class benchi extends Sedan{
    public benchi(String color,String chepai){
        super(color,chepai);
        super.Introduce("奔驰");
        super.startup("奔驰");
        super.accelerate("奔驰");
        super.brake("奔驰");
    }
    public benchi(){

    }
}